﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entity;
using DAL;

namespace BLL
{
    public class WorkService
    {
        private WorksDAL workDAL = new WorksDAL();

        public IList<BoWorks> GetAllWorks()
        {
            return workDAL.GetAllWorks();
        }
        public void CreatWork(BoWorks work)
        {
            workDAL.Insert(work);
        }
        public void UpDate(BoWorks work)
        {
            workDAL.Update(work);
        }
        public void DeleteWork(BoWorks work)
        {
            workDAL.Delete(work.WOR_ID);
        }

        public BoWorks GetWork(string id)
        {
            return workDAL.GetModel(id);
        }

        public IList<BoWorks> GetContestWorks(string contest)
        {
            return workDAL.GetContestWorks(contest);
        }
    }
}
